package com.huluobo.base.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.huluobo.base.bean.KeyWordBean
import io.reactivex.Observable

/**
 *  Created by LC on 2024/7/26.
 */
@Dao
interface KeywordsDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertKeyword(keyWordBean: KeyWordBean)

    @Query("select * from keyword_info")
    fun queryAllKeywords(): Observable<List<KeyWordBean>>

    @Delete
    fun deleteKeyword(keyWordBean: KeyWordBean)
}